package api

import (
	"chat/api/handler"
	"chat/pkg"
	"github.com/gin-gonic/gin"
)

func RouterLoad(r *gin.Engine) {
	r.POST("/user/login", handler.Login)
	user := r.Group("/user").Use(pkg.JWTAuth("2209a"))
	{
		user.GET("/chat", handler.Chat)
		user.GET("/list", handler.List)
		user.GET("/list/message", handler.ListMessage)
	}
}
